﻿
Public Class isurl
    Public Const functionName As String = "isurl"

    'only check . and / so it has a high recall rate
    Public Shared Function invoke(ByVal inlineScript As inlineScript, ByVal s As String, _
                                  Optional ByRef actionTarget As String = Nothing) As String
        assert(Not inlineScript Is Nothing, "inlineScript is nothing.")
        inlineScript.addscript(functionName, "function " + functionName + "(i){" + _
                               "return i.indexOf(""."")!=-1 || i.indexOf(""/"")!=-1;" + _
                               "}")
        actionTarget += functionName + "(" + s + ")"
        Return actionTarget
    End Function
End Class
